<script setup>
import { ref } from "vue";
import { useViewWH } from "../mixins/index.js";

const componentRef = ref(null);

const { width, height } = useViewWH(componentRef)

</script>

<template>
  <div class="right border-red" ref="componentRef">
    <div>width: {{width}}px</div>
    <div>height: {{height}}px</div>
  </div>
</template>

<style scoped>
.right {
  width: 30rem;
  height: 100%;
}

</style>
